import request from "../../utils/request";

const api_name = '/fastDFSFile'

export default {
  //上传图片
  uploadImg() {
    return request({
      url: `${api_name}`,
      method: 'post',
    })
  },
  getPageFastImg(page, limit) {
    return request({
      url: `${api_name}/getPageFastImg/${page}/${limit}`,
      method: 'get',
    })
  },
  getNextPageFastImg(page, limit) {
    return request({
      url: `${api_name}/getPageFastImg/${page}/${limit}`,
      method: 'get',
    })
  },
  //restful风格 ?id=123&fileId=456
  deleteFastImg(id, fileId) {
    return request({
      url: `${api_name}`,
      method: 'delete',
      params: {
        "id": id,
        "fileId": fileId
      }
    })
  },
  getFileSrc(fileId) {
    return request({
      url: `${api_name}`,
      method: 'get',
      params: {
        "fileId": fileId
      },
      responseType: 'blod'
    })
  },
}
